import random
import string
def jihuoma(n):
    with open("jihuoma.txt","w+") as jihuo:
        if n.isdigit():
            # count = 0
            for j in range(int(n)):
                for i in range(32):
                    num1 = random.choice(num)
                    jihuo.write(num1)
                jihuo.write("\n")
        else:
            n = input("输入不合法，请重新输入：")
            return n

num =list("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ")
n = input("请输入激活码的个数：")
jihuoma(n)





